package com.sandasai.action.teacher;
import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.sandasai.service.TeacherManager;
import com.sandasai.vo.StudentBean;
import com.sandasai.vo.TeacherBean;
@Controller
@Scope("prototype")
public class TeacherPersonInfoPageAction extends ActionSupport {
    /**
	 * 
	 */
	@Resource
	private TeacherManager teacherManager;
	
	private static final long serialVersionUID = 1L;

	/**
     * @return
     */
    public String execute() {
    	ActionContext ctx = ActionContext.getContext();
        String username = (String) ctx.getSession().get("username");
        TeacherBean teacherBean = teacherManager.getTeacherBean(username);
        ctx.put("teacherBean", teacherBean);
        return SUCCESS;
    }
}